<template>
	<view class="content">
		<up-navbar :title="name + '签到日志'" placeholder autoBack></up-navbar>
		<view class="u-page">
			<up-list>
				<up-list-item v-for="(item, index) in dataList" :key="index">
					<up-cell :title="`签到时间: ${item.create_time}`" :label="`备注：${item.remark}`"
						:titleStyle="{'fontSize': '32rpx'}">
					</up-cell>
				</up-list-item>
			</up-list>
		</view>
	</view>
</template>

<script setup lang="ts">
	import { ref, reactive, unref } from 'vue'
	import { onLoad } from '@dcloudio/uni-app'
	import { storeSignLog } from '@/package_tools/api/Home'
	onLoad((options) => {
		id.value = options.network_id
		name.value = options.store_name
		getSignInfo(id.value)
	})

	const id = ref('')
	const name = ref('')
	const dataList = ref([])
	const getSignInfo = async (id) => {
		const res = await storeSignLog({ store_id: id })
		dataList.value = res.data.data
	}
</script>

<style scoped lang="scss">
	.content {
		width: 100%;
		padding: 12rpx;
		box-sizing: border-box;

		.line {
			display: flex;

			.item {
				display: flex;
				align-items: center;
				justify-content: center;
			}
		}
	}
</style>